${common}
<script type="text/javascript" src="${appRoot}/res/lib/jquery.multifile-1.4.6.js"></script>
<script src="route/scripts.js" type="text/javascript"></script>
<link href="route/styles.css" rel="stylesheet"/>

<p class="statline ui-state-highlight">
	<input type="button" id="add-route" style="width: 80px" value="新增路由">
</p>

<form id="search-form" method="GET">
    <table class="nicetable ui-widget">
        <thead class="ui-widget-header">
        <tr>
            <th colspan="2" class="ui-widget-header">Search</th>
        </tr>
        </thead>
        <tbody class="ui-widget-content">
		<tr>
			<td style="width: 10%">路由文件名称</td>
			<td style="width: 70%"><input name="phrase" value="" style="width:70%" class="ui-state-default ui-corner-all" autofocus></td>
		</tr>
		<tr>
			<td style="width: 10%">可选项</td>
			<td style="width: 90%">
				<label title="Cut off results found to concrete count.">
					<span>最大显示数量</span>
					<input name="resultLimit" value="60" style="width: 50px;" class="ui-state-default ui-corner-all" type="number" min="1" max="9999">
					<input name="provider" type="checkbox" value="bundle" class="ui-state-default ui-corner-all" checked hidden="hidden">
				</label>
			</td>
		</tr>
		<tr>
			<td style="width: 10%">进度</td>
			<td style="width: 90%" class="progress">
				<span class="spinner done"></span>
				<span class="text">Ready</span>
			</td>
		</tr>
        </tbody>
    </table>
</form>
<div id="search-results">
	<script type="text/x-handlebars-template">
		<table class="nicetable ui-widget">
			<thead class="ui-widget-header">
			<tr>
				<th class="ui-widget-header" style="width: 3%">&nbsp;</th>
				<th class="ui-widget-header" style="width: 15%">路由文件名称</th>
				<th class="ui-widget-header" style="width: 15%">路由名称</th>
				<th class="ui-widget-header" style="width: 30%">路由描述</th>
				<th class="ui-widget-header" style="width: 15%">数据源</th>
				<th class="ui-widget-header" style="width: 30%">数据接收端</th>
				<th class="ui-widget-header" style="width: 5%">状态</th>
				<th class="ui-widget-header" style="width: 5%">操作</th>
			</tr>
			</thead>
			<tbody class="ui-widget-content">
			{{#each results}}
			<tr class="result" data-result='{{json this}}'>
				<td><input type="checkbox" name="result" value="{{id}}"/></td>
				<td>{{routeFileName}}</td>
				<td>{{routeName}}</td>
				<td>{{routeDesc}}</td>
				<td>{{originName}}</td>
				<td>{{destNames}}</td>
				<td>{{state}}</td>
				<td>
					<a href="javascript:void(0);" onclick="updateFile('{{id}}')" class="bundle-update ui-button ui-state-default ui-corner-all" title="更新">
						<span class="ui-icon ui-icon-refresh"></span>
					</a>
					<a href="javascript:void(0);" onclick="deleteFile('{{id}}')" class="class-delete ui-button ui-state-default ui-corner-all" title="删除">
						<span class="ui-icon ui-icon-trash"></span>
					</a>
				</td>
			</tr>
			</tr>
			{{else}}
			<tr>
				<td colspan="4">路由列表为空.</td>
			</tr>
			{{/each}}
			</tbody>
		</table>
	</script>
</div>
<script id="add-new-route-template" type="text/x-handlebars-template">
	<div class="dialog dialog-overflow dialog-class-new-route">
		<pre class="class-source">测试</pre>
	</div>
</script>

<div id="uploadDialog" class="ui-helper-hidden" title="" >
	<form method="post" name="filePost" enctype="multipart/form-data" action="${pluginRoot}/by-phrase">
		<table class="nicetable">
			<tr>
				<td>&nbsp;选择路由文件上传</td>
				<td>
					<input type="file" name="routeFile" />
					<input type="hidden" name="action" value="install"/>
					<input type="hidden" name="bundleId" value=""/>
				</td>
				<!--<td>-->
					<!--<input type="submit" name="submitFile" style="width: 100px" value="提交" />-->
				<!--</td>-->
			</tr>
		</table>
	</form>
</div>
